home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4546 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.0 KB

  1. Path: news.arrowsmith.com!news
  2. From: Sylvia Tien <tienys>
  3. Newsgroups: comp.lang.c++
  4. Subject: enum in derived class on different platforms
  5. Date: 30 Jan 1996 22:56:41 GMT
  6. Organization: Arrowsmith Technologies Inc.
  7. Message-ID: <4em7n9$jk4@fireman.arrowsmith.com>
  8. NNTP-Posting-Host: spruce.arrowsmith.com
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 1.1N (X11; I; HP-UX A.09.05 9000/712)
  13. X-URL: news:comp.lang.c++
  14.  
  15. Question:
  16. Does enum in derived class acts differently on different platforms?
  17.  
  18. Background:
  19. The way enum works on HP:
  20. base class B: 
  21.     enum TYPE {type1=1, type2=2}
  22. derived class D:
  23.     enum TYPE {type2=0, type3=3}
  24.  
  25. D sees type1=1 and overwrites type2.
  26.  
  27.  
  28. -- 
  29.  
  30.     ========================================
  31.     Arrowsmith Technologies, Inc.
  32.     8920 Business Park Drive
  33.     Austin, Texas 78759
  34.     (512) 349-8351
  35.     sylvia_tien@arrowsmith.com
  36.     ========================================
  37.  
  38.     Success isn't the result of hard work alone;
  39.     it's mostly the result of right thinking.
  40.  
  41.                             -- U.S. Anderson
  42.  
  43.